 using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class UserControl_Tim : System.Web.UI.UserControl
{
    timkiem tk = new timkiem();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            DataTable tbl = tk.load_loaihoa();                                 
            tbl.Rows.Add(-1,"Chọn Thể Loại");
            ddlchude.DataSource = tbl; 
            ddlchude.DataTextField = "TenLoai";
            ddlchude.DataValueField = "MaLoai";
            ddlchude.DataBind();

            ddlchude.SelectedValue ="-1";
           
        }
    }
    protected void btntim_Click(object sender, EventArgs e)
    {
      string test="";
        string chude = ddlchude.SelectedValue.ToString();
        string tugia = txttugia.Text;
        string dengia = txtdengia.Text;
        string url = string.Format("TimKiem.aspx?chude={0}&tugia={1}&dengia={2}", chude, tugia, dengia);
        Response.Redirect(url);
    }
}